from likeshop_api_project.api.login_api import login_model
from likeshop_api_project.base.myBase import Tools


class del_dz_model(Tools):
    path = '/api/user_address/del'

    def del_dz_action(self, id, hd):
        mydata = {
            "id": id
        }
        print(self.hosturl + self.path)
        res = self.huihua.post(url=self.hosturl + self.path, data=mydata, headers=hd)
        return res.json()


# import requests
#
# s = requests.session()
# login = login_model(huihua=s)
# msg = login.login_action(account='17612345678', pwd='admin123', client='4')
# print(msg)
# tokena = msg['data']['token']
# hd = {
#     'token': tokena
# }
# print(hd)
# del_dz = del_dz_model(huihua=s)
#
# msg2 = del_dz.del_dz_action(id=835, hd=hd)
# print(msg2)
